import React from 'react';
import ReactDOM from 'react-dom';
import {renderRoutes} from 'react-router-config';
import * as serviceWorker from './libs/serviceWorker';
import {BrowserRouter as Router, Switch} from 'react-router-dom';
import routes from './router/router.js';
import '@assets/css/base.css';
import Layout from '@components/layout/index.jsx';
ReactDOM.render(
  <React.StrictMode>
    <Router>
      <Switch>
        <Layout>
          {renderRoutes(routes)}
        </Layout>
      </Switch>
    </Router>
  </React.StrictMode>,
  document.getElementById('page')
);

serviceWorker.unregister();
